<template>
	<view>
		<view style="display: flex; margin: 30rpx;justify-content: center;align-items: center;">
			<image style="width: 300rpx;height: 300rpx;" mode="aspectFit" src="../../static/icon_payee.png"></image>
		</view>
		<view style="font-size: 36rpx;text-align: center;">开通成为委托收款人</view>
		<view class="view-button" @click="onnext()">申请开通</view>
		{{content}}
	</view>
</template>

<script>
export default {
	data() {
		return {
			content:''
		};
	},
	methods: {
		
		onnext() {
			let driverId = uni.getStorageSync(this.DATA_KEY.userInfo).driverId;
			
			uni.setStorageSync('isOnelive',0);
			
			// this.wxRequest({
			// 	url: `${this.API}/driverService/saveFaceVerifyState`,
			// 	method: 'POST',
			// 	data: {
			// 		driverId: uni.getStorageSync(this.DATA_KEY.userInfo).driverId,
			// 		orderNumber: uni.getStorageSync(this.DATA_KEY.orderNumber),
			// 		platformCoId: uni.getStorageSync(this.DATA_KEY.platformCoNo) == '0001' ? '100001' : '100002',
			// 		accessToken: uni.getStorageSync(this.DATA_KEY.accessToken)
			// 	},
			// 	success: res => {
			// 		console.log(res.data, '活体接口')
			// 		// this.onMyinfo()
			// 		// uni.removeStorageSync(this.DATA_KEY.accessToken);
			// 		// uni.removeStorageSync(this.DATA_KEY.orderNumber);
			// 		// uni.removeStorageSync(this.DATA_KEY.liveFlag);
			// 	}
			// })
			this.wxRequest({
				// url: `${this.API}/driverService/delegatedPayeeLive`,
				url: `${this.API}/driverService/getDriverInfoByDriverID?driver_id=` + uni.getStorageSync(this.DATA_KEY.userInfo).driverId + '&etp_id=' + uni.getStorageSync(this.DATA_KEY.etpId),
				method: 'POST',
				title: '加载中...',
				data:{driverId: driverId},
				success: res => {
					console.log(res.data.data,444444444)
					if(res.data.data == 1){
						uni.redirectTo({
							url: '../personal/review?isw=1'
						});
					}else{
						uni.navigateTo({
							url: `/pages/personal/delegatedPavee`
						});
					}
				}
			})
			
		}
	}
};
</script>

<style>
.row-css {
	display: flex;
	flex-direction: row;
}

.column-css {
	display: flex;
	flex-direction: column;
}
.view-button {
	display: flex;
	flex: 1;
	background: #2b7cff;
	border-radius: 5rpx;
	padding: 20rpx;
	margin: 30rpx;
	margin-top: 50rpx;
	justify-content: center;
	color: #ffffff;
}
</style>
